/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50626
 Source Host           : localhost
 Source Database       : zsdb

 Target Server Type    : MySQL
 Target Server Version : 50626
 File Encoding         : utf-8

 Date: 07/10/2017 00:13:56 AM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `call_history`
-- ----------------------------
DROP TABLE IF EXISTS `call_history`;
CREATE TABLE `call_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `answer_employee_id` varchar(11) DEFAULT NULL COMMENT '应答人id',
  `answer_employee_name` varchar(30) DEFAULT NULL COMMENT '应答人名字',
  `call_time` datetime DEFAULT NULL COMMENT '来电时间',
  `answer_time` datetime DEFAULT NULL COMMENT '接听时间',
  `answer_phone_num` varchar(11) DEFAULT NULL COMMENT '呼叫号码',
  `call_total_time` varchar(255) DEFAULT NULL COMMENT '通话时间',
  `record_url` varchar(255) DEFAULT NULL COMMENT '录音记录url',
  `work_order_no` int(5) DEFAULT NULL COMMENT '工单号',
  `record_status` tinyint(1) DEFAULT NULL COMMENT '记录状态 0：未处理，1：已派单，-1：已关闭',
  `created_time` datetime DEFAULT NULL,
  `updated_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='来电记录表';

-- ----------------------------
--  Records of `call_history`
-- ----------------------------
BEGIN;
INSERT INTO `call_history` VALUES ('1', '01', '宏泰', '2017-07-08 17:23:32', '2017-07-08 17:26:35', '18682564616', '3分30秒', 'www.baidu.com', '9527', '1', '2017-07-08 16:24:36', '2017-07-08 17:24:47'), ('2', '01', '希望', '2017-05-08 17:23:32', '2017-05-08 17:26:35', '18682564616', '3分30秒', 'www.baidu.com', '9527', '1', '2017-07-08 16:24:36', '2017-07-08 17:24:47'), ('3', '01', '流亡', '2017-03-08 17:23:32', '2017-03-08 17:26:35', '18682564616', '3分30秒', 'www.baidu.com', '9527', '1', '2017-07-08 16:24:36', '2017-07-08 17:24:47'), ('4', '01', '张三', '2017-01-08 17:23:32', '2017-01-08 17:26:35', '18682564616', '3分30秒', 'www.baidu.com', '9527', '1', '2017-07-08 16:24:36', '2017-07-08 17:24:47'), ('5', '01', '李大玩', '2017-05-08 17:23:32', '2017-05-08 17:26:35', '18682564616', '3分30秒', 'www.baidu.com', '9527', '1', '2017-07-08 16:24:36', '2017-07-08 17:24:47'), ('6', '01', '万庆', '2017-06-08 17:23:32', '2017-06-08 17:26:35', '18682564616', '3分30秒', 'www.baidu.com', '9527', '1', '2017-07-08 16:24:36', '2017-07-08 17:24:47');
COMMIT;

-- ----------------------------
--  Table structure for `callrecord`
-- ----------------------------
DROP TABLE IF EXISTS `callrecord`;
CREATE TABLE `callrecord` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `respondenter` varchar(10) DEFAULT NULL COMMENT '应答人',
  `callNumber` varchar(30) DEFAULT NULL COMMENT '来电号码',
  `callDate` datetime DEFAULT NULL COMMENT '来电时间',
  `responseDate` datetime DEFAULT NULL COMMENT '接电时间',
  `talkingDate` datetime DEFAULT NULL COMMENT '通话时间',
  `recording` blob COMMENT '录音记录',
  `status` int(5) DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `deparment`
-- ----------------------------
DROP TABLE IF EXISTS `deparment`;
CREATE TABLE `deparment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL COMMENT '名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `it_engineer`
-- ----------------------------
DROP TABLE IF EXISTS `it_engineer`;
CREATE TABLE `it_engineer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `engineer_name` varchar(20) DEFAULT NULL COMMENT '名字',
  `engineer_phone_num` int(10) DEFAULT NULL COMMENT '年龄',
  `expire_time` int(20) NOT NULL COMMENT '联系方式',
  `work_order_no` varchar(20) DEFAULT NULL COMMENT '所属部门',
  `called_time` datetime DEFAULT NULL,
  `arrived_time` datetime DEFAULT NULL,
  `trouble_address` varchar(255) DEFAULT NULL,
  `created_time` datetime DEFAULT NULL,
  `updated_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='it运维工程师工况表';

-- ----------------------------
--  Records of `it_engineer`
-- ----------------------------
BEGIN;
INSERT INTO `it_engineer` VALUES ('1', '李大刚', '1868256461', '30', '9526', '2017-07-07 17:38:34', '2017-07-07 18:38:57', '学府路', '2017-07-07 15:39:24', '2017-07-08 17:39:33');
COMMIT;

-- ----------------------------
--  Table structure for `notice`
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `noticeDate` datetime DEFAULT NULL COMMENT '公告时间',
  `noticeContent` varchar(5000) DEFAULT NULL COMMENT '公告内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `orderexetrack`
-- ----------------------------
DROP TABLE IF EXISTS `orderexetrack`;
CREATE TABLE `orderexetrack` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `operatePerson` varchar(20) DEFAULT NULL COMMENT '工单人',
  `callNumber` varchar(30) DEFAULT NULL COMMENT '电话时间',
  `arrivalTime` datetime DEFAULT NULL COMMENT '抵达时间',
  `callTime` datetime DEFAULT NULL COMMENT '电话来电时间',
  `arrivalTimeout` datetime DEFAULT NULL COMMENT '到达超时时间',
  `repairAddress` varchar(255) DEFAULT NULL COMMENT '故障地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `project_log`
-- ----------------------------
DROP TABLE IF EXISTS `project_log`;
CREATE TABLE `project_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` varchar(30) DEFAULT NULL COMMENT '项目编号',
  `project_name` varchar(100) DEFAULT NULL COMMENT '项目名称',
  `project_team` varchar(20) DEFAULT NULL COMMENT '项目组',
  `spend_time` bigint(50) NOT NULL COMMENT '耗时分钟数',
  `recorder` varchar(20) DEFAULT NULL COMMENT '填写人',
  `updated_time` datetime DEFAULT NULL COMMENT '更新日期',
  `created_time` datetime DEFAULT NULL COMMENT '填写时间',
  `project_log_name` varchar(500) DEFAULT NULL COMMENT '日志任务名称',
  `project_log_content` text COMMENT '日志内容',
  `audit_status` int(5) DEFAULT NULL COMMENT '审核状态：0，未审核；1，审核通过；2，审核拒绝',
  `audit_content` varchar(500) DEFAULT NULL COMMENT '审核意见',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `project_log`
-- ----------------------------
BEGIN;
INSERT INTO `project_log` VALUES ('1', '001', '配置处理', '0', '50', '张三', '2017-07-07 16:12:23', '2017-07-07 16:12:27', '少时诵诗书所所所所所', '呜呜呜呜无无无无多多多多', '1', '有意见'), ('2', '002', '需求计划', '1', '95', '李四', '2017-07-07 16:13:51', '2017-07-07 16:13:53', '业务需求书不正确', '业务需求书不正确11111', '0', null), ('3', '003', '配置处理', '0', '70', '王三', '2017-07-07 16:12:23', '2017-07-07 16:12:27', '少时诵诗书所所所所所', '呜呜呜呜无无无无多多多多', '1', '有意见'), ('4', '004', '需求计划', '1', '100', '李六', '2017-07-07 16:13:51', '2017-07-07 16:13:53', '业务需求书不正确', '业务需求书不正确11111', '1', null), ('5', '005', '配置处理', '0', '30', '王七', '2017-07-07 16:12:23', '2017-07-07 16:12:27', '少时诵诗书所所所所所', '呜呜呜呜无无无无多多多多', '0', ''), ('6', '006', '需求计划', '1', '100', '李八', '2017-07-07 16:13:51', '2017-07-07 16:13:53', '业务需求书不正确', '业务需求书不正确11111', '1', null);
COMMIT;

-- ----------------------------
--  Table structure for `projectlog`
-- ----------------------------
DROP TABLE IF EXISTS `projectlog`;
CREATE TABLE `projectlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `projectNumber` varchar(30) DEFAULT NULL COMMENT '项目编号',
  `projectName` varchar(100) DEFAULT NULL COMMENT '项目名称',
  `projectTeam` varchar(20) DEFAULT NULL COMMENT '项目组',
  `spendTime` bigint(50) NOT NULL COMMENT '耗时分钟数',
  `startTime` datetime NOT NULL COMMENT '开始时间',
  `endTime` datetime DEFAULT NULL COMMENT '完成时间',
  `recorder` varchar(20) DEFAULT NULL COMMENT '填写人',
  `recordeTime` datetime DEFAULT NULL COMMENT '填写时间',
  `projectLogName` varchar(500) DEFAULT NULL COMMENT '日志任务名称',
  `projectLogContent` text COMMENT '日志内容',
  `auditStatus` int(5) DEFAULT NULL COMMENT '审核状态：0，未审核；1，审核通过；2，审核拒绝',
  `auditDetail` varchar(500) DEFAULT NULL COMMENT '审核意见',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `resource`
-- ----------------------------
DROP TABLE IF EXISTS `resource`;
CREATE TABLE `resource` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `type` int(1) DEFAULT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `updated_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `resource`
-- ----------------------------
BEGIN;
INSERT INTO `resource` VALUES ('1', '信息发布', null, null, '/message', '2017-07-08 13:58:30'), ('2', '调度中心', null, null, '/second', '2017-07-08 13:58:30'), ('3', '统计中心', null, null, '/third', '2017-07-08 13:58:30'), ('4', '用户管理', null, null, '/four', '2017-07-08 13:58:30');
COMMIT;

-- ----------------------------
--  Table structure for `role`
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '角色名称',
  `info` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `role_resource`
-- ----------------------------
DROP TABLE IF EXISTS `role_resource`;
CREATE TABLE `role_resource` (
  `roleId` int(11) NOT NULL,
  `resourceId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(50) DEFAULT NULL COMMENT '用户名',
  `password` varchar(100) DEFAULT NULL COMMENT '密码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', '张三', '12345'), ('2', '李四', '12345'), ('3', '王五', '12345'), ('4', 'admin', 'admin');
COMMIT;

-- ----------------------------
--  Table structure for `user_resource`
-- ----------------------------
DROP TABLE IF EXISTS `user_resource`;
CREATE TABLE `user_resource` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `userId` int(11) DEFAULT NULL,
  `resourceId` int(11) DEFAULT NULL,
  `link_flag` int(1) DEFAULT '0',
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user_resource`
-- ----------------------------
BEGIN;
INSERT INTO `user_resource` VALUES ('2', '1', '2', '1'), ('3', '1', '3', '1'), ('4', '2', '1', '1'), ('5', '2', '2', '1'), ('6', '2', '3', '1'), ('7', '3', '1', '0');
COMMIT;

-- ----------------------------
--  Table structure for `user_role`
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `userId` int(11) NOT NULL,
  `roleId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `wordorder`
-- ----------------------------
DROP TABLE IF EXISTS `wordorder`;
CREATE TABLE `wordorder` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `workOrderNo` varchar(30) DEFAULT NULL COMMENT '工单号',
  `department` varchar(30) DEFAULT NULL COMMENT '问题科室',
  `callNumber` varchar(20) DEFAULT NULL COMMENT '来电号码',
  `problemDetail` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `chargePerson` varchar(30) DEFAULT NULL COMMENT '责任人',
  `status` int(5) DEFAULT NULL COMMENT '工单状态',
  `isPause` int(5) DEFAULT NULL COMMENT '是否暂停',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `work_log`
-- ----------------------------
DROP TABLE IF EXISTS `work_log`;
CREATE TABLE `work_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `write_Employee_Id` varchar(20) NOT NULL COMMENT '发布日志的员工Id',
  `write_Employee_Name` varchar(30) NOT NULL COMMENT '发布日志的员工名称',
  `work_Log_Name` varchar(500) DEFAULT NULL COMMENT '日志名称',
  `work_Log_Content` text COMMENT '日志内容',
  `created_Time` datetime DEFAULT NULL COMMENT '日志填入时间',
  `updated_Time` datetime DEFAULT NULL,
  `message_type` int(5) DEFAULT NULL COMMENT '状态：0表示日志；1表示公告',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `work_log`
-- ----------------------------
BEGIN;
INSERT INTO `work_log` VALUES ('1', '2520300', '希望', '7.4工作感想', '支持的是医院,受益的是基层百姓', '2017-07-04 10:26:26', null, '0'), ('2', '2520301', '李凡', '工作日记', '美媒:纽约医院枪击案唯一死者为华裔代班女医生 	', '2017-06-22 10:30:00', null, '0'), ('3', '2520302', '张达', '故障处理', '处理供应室断电问题', '2017-07-01 10:30:40', null, '0'), ('4', '2520303', '刘三', '工作汇报', '贯彻落实党中央的任务', '2017-07-02 10:31:45', null, '0'), ('5', '2520305', '王克强', '汇报工作', '坚定不移地追随习大大和党中央的领导', '2017-07-05 11:23:35', null, '0'), ('6', '2520305', '王六同志', '汇报工作1', '坚定不移地走社会主义发展道路', '2017-07-05 13:16:38', null, '0'), ('7', '2520305', '刘大伟', '汇报工作1', '坚定不移地走社会主义发展道路', '2017-07-05 13:51:52', null, '1'), ('8', '2520305', '李红红', '汇报工作1', '坚定不移地走社会主义发展道路', '2017-07-05 13:52:17', null, '1'), ('9', '2520307', '刘超', '汇报工作3', '坚定不移地走社会主义发展道路', '2017-07-05 13:52:45', null, '1'), ('10', '2520307', '刘熙', '汇报工作3', '坚定不移地走社会主义发展道路', '2017-07-05 16:57:42', null, '1'), ('11', '2520308', '万振', '公告目录', '公告内容', '2017-07-04 22:02:14', null, '1'), ('12', '2520309', '红海', '公告', '公告内容测试', '2017-07-05 22:02:41', null, '1'), ('13', '2520310', '严玉', '公告名称测试', '公告内容测试1', '2017-07-03 22:03:09', null, '1');
COMMIT;

-- ----------------------------
--  Table structure for `work_order`
-- ----------------------------
DROP TABLE IF EXISTS `work_order`;
CREATE TABLE `work_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `work_order_NO` varchar(30) DEFAULT NULL COMMENT '工单号',
  `department_id` varchar(10) DEFAULT NULL COMMENT '科室编号',
  `department_name` varchar(30) DEFAULT NULL COMMENT '问题科室',
  `call_phone_number` varchar(11) DEFAULT NULL COMMENT '来电号码',
  `trouble_detail` varchar(255) DEFAULT NULL COMMENT '故障描述',
  `charge_person_id` varchar(11) DEFAULT NULL COMMENT '负责人Id',
  `charge_person_name` varchar(30) DEFAULT NULL COMMENT '责任人姓名',
  `order_status` tinyint(1) NOT NULL COMMENT '工单状态：0，未派指派；1，已指派；-1：已终止；2，已解决；3：已抵达，4：已暂停',
  `engineerName` varchar(255) DEFAULT NULL,
  `engineerPhoneNum` varchar(11) NOT NULL,
  `created_time` datetime DEFAULT NULL COMMENT '创建工单时间',
  `updated_time` datetime DEFAULT NULL COMMENT '更新工单时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='工单表';

-- ----------------------------
--  Records of `work_order`
-- ----------------------------
BEGIN;
INSERT INTO `work_order` VALUES ('1', '002283930493001', '011', '产科一病房', '85802755', '打印机坏了', '1', '张大红', '0', '阿玉', '18682564616', '2017-07-10 16:27:47', '2017-07-10 22:43:18'), ('2', '002283930493002', '012', '产科二病房', '85802755', '空调不能制冷', '2', '周大卫', '1', '刚神', '18682564617', '2017-07-10 16:29:53', '2017-07-09 22:43:11'), ('3', '002283930493003', '021', '内科一病房', '85802755', '电视不能看', '3', '赵撒', '1', '希望', '18682564618', '2017-07-10 16:28:57', '2017-07-09 22:43:08'), ('4', '002283930493004', '033', '外科三病房', '85802755', '空调太冷了', '4', '楚红', '2', '刚神', '18682564619', '2017-07-10 21:12:51', '2017-07-10 21:12:51');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
